<template>
  <div>
    testUpdate
    <p>{{studentA}}</p>
    <button @click="test1">click</button>
  </div>
</template>

<script>
  import {isEqual} from 'lodash'

  export default {
    name: "testUpdate",
    model: {},
    props: {},
    data() {
      return {
        studentA: {
          name: 'hg',
          age: 10
        },
        num: 10
      }
    },
    computed: {},
    beforeCreate: function () {

    },
    created: function () {

    },
    beforeMount: function () {

    },
    mounted: function () {

    },
    updated: function () {
      console.log('update')
    },
    activated: function () {

    },
    deactivated: function () {

    },
    beforeDestroy: function () {

    },
    destroyed: function () {

    },
    methods: {
      test1() {
        console.log('in test')
        if (!isEqual(this.studentA, {
          name: 'hg',
          age: 10
        })) {
          this.studentA = {
            name: 'hg',
            age: 10
          }
        }
      }
    }
  }
</script>

<style scoped>

</style>
